Skip to content

feat(qwenpaw): adapt worker runtime to QwenPaw 2.0 - #1077

Draft
shiyiyue1102 wants to merge 38 commits into
mainfrom
codex/qwenpaw-2-startup
Draft

feat(qwenpaw): adapt worker runtime to QwenPaw 2.0#1077
shiyiyue1102 wants to merge 38 commits into
mainfrom
codex/qwenpaw-2-startup

Conversation

@shiyiyue1102

Copy link
Copy Markdown
Collaborator

Summary

  • pin the QwenPaw Worker runtime to qwenpaw==2.0.0.post3 and adopt its native startup and schema contracts
  • keep model, MCP, Agent Package skills, Matrix overlay, TeamHarness, and WorkerFlow compatible with QwenPaw 2.0
  • wait for runtime/runtime.yaml before starting local QwenPaw workers
  • add QwenPaw Worker dimensions to the existing integration-test workflow, including the TeamHarness plugin-mode end-to-end test

Why

QwenPaw 2.0 changes its Python/runtime contracts and no longer needs the QwenPaw 1.x source patch used for deferred MCP startup. The existing GitHub integration matrix also covered CoPaw and Hermes workers but did not build or exercise QwenPaw workers.

Validation

  • qwenpaw/.venv/bin/pytest -q qwenpaw/tests — 182 passed, 1 skipped
  • TeamHarness QwenPaw adapter tests — 11 passed
  • WorkerFlow QwenPaw adapter tests — 2 passed
  • focused Controller member-reconcile tests — passed
  • QwenPaw Worker image build, startup, health, and runtime hot-update smoke tests — passed locally
  • workflow YAML parsing and git diff --check — passed

Real model and full Matrix end-to-end behavior are intentionally left to the GitHub Actions integration run, which has the required LLM secret.

Change-Id: I9ad741de07f4b7bfbbe3721030df8749546a0def
@shiyiyue1102
shiyiyue1102 force-pushed the codex/qwenpaw-2-startup branch from 6e3cd41 to 912cfd3 Compare July 25, 2026 14:02
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr-2 / mgr=copaw / wk=copaw)

Commit: 60a8c88
Workflow run: #1800

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=copaw)

Commit: fbdf762
Workflow run: #1786

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=qwenpaw)

Commit: bcb6ed0
Workflow run: #1751

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 93 97 -4 ↓ -4.1%
Input Tokens 3350698 2719498 +631200 ↑ +23.2%
Output Tokens 18497 16508 +1989 ↑ +12.0%
Total Tokens 3369195 2736006 +633189 ↑ +23.1%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 80 72 +8 ↑ +11.1%
Input Tokens 3048892 2092724 +956168 ↑ +45.7%
Output Tokens 15686 10274 +5412 ↑ +52.7%
Total Tokens 3064578 2102998 +961580 ↑ +45.7%
🔧 Workers LLM Calls 13 25 -12 ↓ -48.0%
Input Tokens 301806 626774 -324968 ↓ -51.8%
Output Tokens 2811 6234 -3423 ↓ -54.9%
Total Tokens 304617 633008 -328391 ↓ -51.9%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 11 0 +6 ↑ +120.0% 330755 0 1444 0 +195211 ↑ +142.5% ⚠️ regressed
03-assign-task 12 6 +5 ↑ +38.5% 420223 145053 2056 950 +258102 ↑ +83.2% ⚠️ regressed
04-human-intervene 17 0 +3 ↑ +21.4% 581123 0 2527 0 +247213 ↑ +73.5% ⚠️ regressed
05-heartbeat 9 0 +2 ↑ +28.6% 355709 0 1490 0 +158995 ↑ +80.2% ⚠️ regressed
06-multi-worker 31 7 -20 ↓ -34.5% 1361082 156753 8169 1861 -226332 ↓ -12.9% ✅ improved

Trends

1 test(s) improved (fewer LLM calls)
⚠️ 4 test(s) regressed (more LLM calls)


Generated by AgentTeams CI on 2026-07-28 03:17:47 UTC


📦 Download debug logs & test artifacts

Change-Id: I7d7930c2391217d2c1887eb4d7e20449b4b16ce8
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (qwenpaw-teamharness / mgr=copaw / wk=qwenpaw)

Commit: 66f5c96
Workflow run: #1781

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

Change-Id: I3073b27f43f0ecde4e6fa2164fd49d2659d50dcf
@shiyiyue1102

Copy link
Copy Markdown
Collaborator Author

@maplefeng-a CI 中发现的问题正在处理中。麻烦有空帮忙 review 一下这次整体改动逻辑是否有问题,重点可以看下 QwenPaw 2.0 的 runtime.yaml desired-state、Worker 启动和热更新链路。谢谢!

Change-Id: I31687da14f2d40bfb50dade36a8d7467e9aa8ddd
Change-Id: Ieeed7e69bf3b23e3f03aaa5168e4fe807040c1fe
@github-actions

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=copaw)

Commit: 88f97c2
Workflow run: #1733

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=qwenpaw)

Commit: d44de0c
Workflow run: #1789

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

Change-Id: I9b2094e39e7dfc12437aedf347199ace79de1f5b
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=hermes)

Commit: 66b87bd
Workflow run: #1780

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

Change-Id: I04a62daf94efad6d0445dce93a56cf897530c25e
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr / mgr=openclaw / wk=openclaw)

Commit: 66b87bd
Workflow run: #1780

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

shiyiyue1102 and others added 11 commits July 26, 2026 12:37
Change-Id: I7af2aece15ab2c733754beee59e31d377ca1d810
Change-Id: I55ac99d6d22041bc7e0d229449fd0333f6ca8a29
Change-Id: I961ed24fb022cbe8ac01fab81dfe018a00c14a5d
Change-Id: Ic437642f20426d03f585442fb06867ede35e6151
Change-Id: I352dc6fa16715f0ce03ce00931e61a0abadc4efc
Change-Id: I03e49cd512911c176c9a8cb3d407877fdf8b2363
Change-Id: I50577926a078ed50232e3eb6af6583d1162be7df
Change-Id: I88060c8e6c49862205ec602de2ae3e72a4f2c879
Change-Id: I37fe3a251d02b74e1a8ef6b5c35b39c811b11914
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction-2 / mgr=copaw / wk=hermes)

Commit: 60a8c88
Workflow run: #1800

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction-2 / mgr=openclaw / wk=openclaw)

Commit: 60a8c88
Workflow run: #1800

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction-2 / mgr=copaw / wk=copaw)

Commit: 60a8c88
Workflow run: #1800

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction-2 / mgr=copaw / wk=qwenpaw)

Commit: 60a8c88
Workflow run: #1800

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

LUOSENGWA added a commit to LUOSENGWA/HiClaw that referenced this pull request Jul 28, 2026
Manager now runs on QwenPaw 2.0.1 alongside PR agentscope-ai#1077's Worker migration.

Key changes:
- Separate venvs: /opt/copaw-venv (copaw 1.0.2 for bridge.py) and
  /opt/venv/qwenpaw (qwenpaw 2.0.1 for Manager runtime), avoiding
  agentscope version conflict (1.0.20 vs 2.0.4)
- Replace copaw hooks (monkey-patch CoPawAgent._create_toolkit) with
  agentteams-manager-tools QwenPaw plugin (api.register_tool()) for
  projectflow/taskflow/message/filesync
- Delete Matrix channel physical overlay; use QwenPaw plugin system
  (agentteams-matrix-channel) symlinked into WORKING_DIR/plugins/
- run_copaw_app.py simplified to runpy.run_module('qwenpaw')
- bridge.py invoked with /opt/copaw-venv/bin/python3 (pure stdlib,
  copaw 1.0.2 deps preserved)
- CI pgrep pattern accepts both 'copaw app' and 'qwenpaw app'
LUOSENGWA added a commit to LUOSENGWA/HiClaw that referenced this pull request Jul 28, 2026
Manager now runs on QwenPaw 2.0.1 alongside PR agentscope-ai#1077's Worker migration.

Key changes:
- Separate venvs: /opt/copaw-venv (copaw 1.0.2 for bridge.py) and
  /opt/venv/qwenpaw (qwenpaw 2.0.1 for Manager runtime), avoiding
  agentscope version conflict (1.0.20 vs 2.0.4)
- Replace copaw hooks (monkey-patch CoPawAgent._create_toolkit) with
  agentteams-manager-tools QwenPaw plugin (api.register_tool()) for
  projectflow/taskflow/message/filesync
- Delete Matrix channel physical overlay; use QwenPaw plugin system
  (agentteams-matrix-channel) symlinked into WORKING_DIR/plugins/
- run_copaw_app.py simplified to runpy.run_module('qwenpaw')
- bridge.py invoked with /opt/copaw-venv/bin/python3 (pure stdlib,
  copaw 1.0.2 deps preserved)
- CI pgrep pattern accepts both 'copaw app' and 'qwenpaw app'
LUOSENGWA added a commit to LUOSENGWA/HiClaw that referenced this pull request Jul 28, 2026
Systematic alignment with PR agentscope-ai#1077 Worker Dockerfile and QwenPaw 2.0
conventions:

Dockerfile:
- CMS observability: loongsuite-instrumentation-copaw → -qwenpaw
  + add loongsuite-otel-util-genai (matches Worker Dockerfile)

start-copaw-manager.sh:
- Add QWENPAW_SECRET_DIR, QWENPAW_RUNNING_IN_CONTAINER,
  QWENPAW_LOG_LEVEL env vars (matches Worker entrypoint)
- CMS bootstrap: replace python3 heredoc script with direct heredoc
  (matches Worker), add LOONGSUITE_PYTHON_SITE_BOOTSTRAP_LOG_SUCCESS
  export
- Inject session file privacy policy into AGENTS.md/SOUL.md (matches
  Worker _ensure_session_file_prompt_policy)
- Remove dead PYTHONPATH=/opt/agentteams/copaw/src (path never existed
  in the image; modules are in site-packages)

agent.manager.json:
- Move approval_level into running section (matches QwenPaw 2.0
  AgentProfileConfig schema, default AUTO)
LUOSENGWA added a commit to LUOSENGWA/HiClaw that referenced this pull request Jul 28, 2026
…disable

Six issues found during deep audit with CI script and PR agentscope-ai#1077 cross-reference:

1. pgrep pattern: \|qwenpaw app was a literal pipe in ERE, breaking
   the original copaw pattern. Manager process cmdline is still
   'python3 -m copaw_worker.run_copaw_app app' (runpy.run_module does
   not change /proc/cmdline), so the original agentscope-ai#1077 pattern works.
   Reverted to 'copaw(_worker\.run_copaw_app)? app'.

2. Plugins invisible at runtime: Dockerfile copied plugins to
   /root/manager-workspace/.copaw/plugins/ (build-time), but the
   install script mounts a host volume at /root/manager-workspace,
   hiding build-time files. Now stores plugins in image-local
   /opt/agentteams/plugins/ and copies them at runtime in
   start-qwenpaw-manager.sh (mirrors Worker's _prepare_builtin_plugin).

3. CMS packages in wrong venv: pip install ran while PATH pointed to
   copaw-venv, but Manager runs from qwenpaw venv. Moved CMS install
   after qwenpaw venv creation with /opt/venv/qwenpaw/bin/pip.

4. QA Agent disable silently fails: jq wrote {"enabled": false} but
   AgentProfileRef requires id + workspace_dir. Pydantic validation
   stripped the incomplete profile, then ensure_qa_agent_exists()
   recreated it with enabled=true. Now writes a complete profile.

5. taskflow._current_actor() working dir resolution inconsistent with
   message.py: only checked env vars, no qwenpaw.constant fallback.
   Added _resolve_working_dir() mirroring message.py's logic.

6. plugin.py docstring stale: claimed taskflow/message still import
   copaw.config.config, but commit 974cdf6 already removed that.
   plugin.json type changed from 'general' to 'tool'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants